home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / include.cbm / exec / memory.i < prev    next >
Text File  |  1987-03-31  |  3KB  |  94 lines

  1.     IFND EXEC_MEMORY_I
  2. EXEC_MEMORY_I SET 1
  3. **********************************************************************
  4. *
  5. *   Commodore Amiga -- ROM Operating System Executive Include File
  6. *
  7. **********************************************************************
  8. *
  9. *   Source Control:
  10. *
  11. *       $Header: memory.i,v 1.0 85/08/28 15:12:02 carl Exp $
  12. *
  13. *       $Locker:  $
  14. *
  15. **********************************************************************
  16.  
  17.     IFND EXEC_NODES_I
  18.     INCLUDE "exec/nodes.i"
  19.     ENDC !EXEC_NODES_I
  20.  
  21.  
  22. *---------------------------------------------------------------------
  23. *
  24. *   Memory List Structures
  25. *
  26. *---------------------------------------------------------------------
  27. *
  28. *   A memory list appears in two forms:  One is a requirements list*
  29. *   the other is a list of already allocated memory.  The format is
  30. *   the same, with the reqirements/address field occupying the same
  31. *   position.
  32. *
  33. *   The format is a linked list of ML structures each of which has
  34. *   an array of ME entries.
  35. *
  36. *---------------------------------------------------------------------
  37.  
  38.  STRUCTURE ML,LN_SIZE
  39.     UWORD   ML_NUMENTRIES           * The number of ME structures that follow
  40.     LABEL   ML_ME                   * where the ME structures begin
  41.     LABEL   ML_SIZE
  42.  
  43.  
  44.  STRUCTURE ME,0
  45.     LABEL   ME_REQS                 * the AllocMem requirements
  46.     APTR    ME_ADDR                 * the address of this block (an alias
  47. *                                   *   for the same location as ME_REQS)
  48.     ULONG   ME_LENGTH               * the length of this region
  49.     LABEL   ME_SIZE
  50.  
  51.  
  52. *------ memory options:
  53.  
  54.     BITDEF  MEM,PUBLIC,0
  55.     BITDEF  MEM,CHIP,1
  56.     BITDEF  MEM,FAST,2
  57.     BITDEF  MEM,CLEAR,16
  58.     BITDEF  MEM,LARGEST,17
  59.  
  60.  
  61. *------ alignment rules for a memory block:
  62.  
  63. MEM_BLOCKSIZE   EQU 8
  64. MEM_BLOCKMASK   EQU (MEM_BLOCKSIZE-1)
  65.  
  66.  
  67. *---------------------------------------------------------------------
  68. *
  69. *   Memory Region Header
  70. *
  71. *---------------------------------------------------------------------
  72.  
  73.  STRUCTURE  MH,LN_SIZE
  74.     UWORD   MH_ATTRIBUTES           * characteristics of this region
  75.     APTR    MH_FIRST                * first free region
  76.     APTR    MH_LOWER                * lower memory bound
  77.     APTR    MH_UPPER                * upper memory bound+1
  78.     ULONG   MH_FREE                 * number of free bytes
  79.     LABEL   MH_SIZE
  80.  
  81.  
  82. *---------------------------------------------------------------------
  83. *
  84. *   Memory Chunk
  85. *
  86. *---------------------------------------------------------------------
  87.  
  88.  STRUCTURE  MC,0
  89.     APTR    MC_NEXT                 * ptr to next chunk
  90.     ULONG   MC_BYTES                * chunk byte size
  91.     APTR    MC_SIZE
  92.  
  93.     ENDC !EXEC_MEMORY_I
  94.